<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: cv::stereo::QuasiDenseStereo Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d2/d7f/namespacecv_1_1stereo.html">stereo</a></li><li class="navelem"><a class="el" href="../../dc/df4/classcv_1_1stereo_1_1QuasiDenseStereo.html">QuasiDenseStereo</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="../../df/d92/classcv_1_1stereo_1_1QuasiDenseStereo-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::stereo::QuasiDenseStereo Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="../../dd/d86/group__stereo.html">Stereo Correspondance Algorithms</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Class containing the methods needed for Quasi Dense Stereo computation.  
 <a href="../../dc/df4/classcv_1_1stereo_1_1QuasiDenseStereo.html#details">More...</a></p>

<p><code>#include &lt;opencv2/stereo/quasi_dense_stereo.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ga7b6824f2d058075b9386051258451397"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga7b6824f2d058075b9386051258451397">~QuasiDenseStereo</a> ()=0</td></tr>
<tr class="memdesc:ga7b6824f2d058075b9386051258451397"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor Method to free all the memory allocated by matrices and vectors in this class.  <a href="../../dd/d86/group__stereo.html#ga7b6824f2d058075b9386051258451397">More...</a><br /></td></tr>
<tr class="separator:ga7b6824f2d058075b9386051258451397"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae0555fac91d17151126d9366bedd2076"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#gae0555fac91d17151126d9366bedd2076">getDenseMatches</a> (std::vector&lt; <a class="el" href="../../d1/dbe/structcv_1_1stereo_1_1MatchQuasiDense.html">MatchQuasiDense</a> &gt; &amp;denseMatches)=0</td></tr>
<tr class="memdesc:gae0555fac91d17151126d9366bedd2076"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get The dense corresponding points.  <a href="../../dd/d86/group__stereo.html#gae0555fac91d17151126d9366bedd2076">More...</a><br /></td></tr>
<tr class="separator:gae0555fac91d17151126d9366bedd2076"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4fc5dfb470181b039d29200457e317a3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga4fc5dfb470181b039d29200457e317a3">getDisparity</a> ()=0</td></tr>
<tr class="memdesc:ga4fc5dfb470181b039d29200457e317a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute and return the disparity map based on the correspondences found in the "process" method.  <a href="../../dd/d86/group__stereo.html#ga4fc5dfb470181b039d29200457e317a3">More...</a><br /></td></tr>
<tr class="separator:ga4fc5dfb470181b039d29200457e317a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8db5b6611adf174b1421760cf755c7f0"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../dc/d84/group__core__basic.html#ga7d080aa40de011e4410bca63385ffe2a">cv::Point2f</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga8db5b6611adf174b1421760cf755c7f0">getMatch</a> (const int x, const int y)=0</td></tr>
<tr class="memdesc:ga8db5b6611adf174b1421760cf755c7f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify pixel coordinates in the left image and get its corresponding location in the right image.  <a href="../../dd/d86/group__stereo.html#ga8db5b6611adf174b1421760cf755c7f0">More...</a><br /></td></tr>
<tr class="separator:ga8db5b6611adf174b1421760cf755c7f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0e880bb85a06ab714ee9e0a45abd71fb"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga0e880bb85a06ab714ee9e0a45abd71fb">getSparseMatches</a> (std::vector&lt; <a class="el" href="../../d1/dbe/structcv_1_1stereo_1_1MatchQuasiDense.html">MatchQuasiDense</a> &gt; &amp;sMatches)=0</td></tr>
<tr class="memdesc:ga0e880bb85a06ab714ee9e0a45abd71fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get The sparse corresponding points.  <a href="../../dd/d86/group__stereo.html#ga0e880bb85a06ab714ee9e0a45abd71fb">More...</a><br /></td></tr>
<tr class="separator:ga0e880bb85a06ab714ee9e0a45abd71fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9dc72c2a623574a50d553d3b2ffd4e52"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga9dc72c2a623574a50d553d3b2ffd4e52">loadParameters</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">cv::String</a> filepath)=0</td></tr>
<tr class="memdesc:ga9dc72c2a623574a50d553d3b2ffd4e52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load a file containing the configuration parameters of the class.  <a href="../../dd/d86/group__stereo.html#ga9dc72c2a623574a50d553d3b2ffd4e52">More...</a><br /></td></tr>
<tr class="separator:ga9dc72c2a623574a50d553d3b2ffd4e52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5644f68f1105873b1678e0ba81d89988"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga5644f68f1105873b1678e0ba81d89988">process</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> &amp;imgLeft, const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> &amp;imgRight)=0</td></tr>
<tr class="memdesc:ga5644f68f1105873b1678e0ba81d89988"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main process of the algorithm. This method computes the sparse seeds and then densifies them.  <a href="../../dd/d86/group__stereo.html#ga5644f68f1105873b1678e0ba81d89988">More...</a><br /></td></tr>
<tr class="separator:ga5644f68f1105873b1678e0ba81d89988"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99cc0835ce4896151100e751ae6b529a"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga99cc0835ce4896151100e751ae6b529a">saveParameters</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">cv::String</a> filepath)=0</td></tr>
<tr class="memdesc:ga99cc0835ce4896151100e751ae6b529a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save a file containing all the configuration parameters the class is currently set to.  <a href="../../dd/d86/group__stereo.html#ga99cc0835ce4896151100e751ae6b529a">More...</a><br /></td></tr>
<tr class="separator:ga99cc0835ce4896151100e751ae6b529a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ga67a1543e567dbfaa0b05630951caac2b"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">cv::Ptr</a>&lt; <a class="el" href="../../dc/df4/classcv_1_1stereo_1_1QuasiDenseStereo.html">QuasiDenseStereo</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#ga67a1543e567dbfaa0b05630951caac2b">create</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">cv::Size</a> monoImgSize, <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">cv::String</a> paramFilepath=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">cv::String</a>())</td></tr>
<tr class="separator:ga67a1543e567dbfaa0b05630951caac2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:gaca27dc931e295b733e740c3601f697a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../de/dfc/structcv_1_1stereo_1_1PropagationParameters.html">PropagationParameters</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d86/group__stereo.html#gaca27dc931e295b733e740c3601f697a6">Param</a></td></tr>
<tr class="separator:gaca27dc931e295b733e740c3601f697a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class containing the methods needed for Quasi Dense Stereo computation. </p>
<p>This module contains the code to perform quasi dense stereo matching. The method initially starts with a sparse 3D reconstruction based on feature matching across a stereo image pair and subsequently propagates the structure into neighboring image regions. To obtain initial seed correspondences, the algorithm locates Shi and Tomashi features in the left image of the stereo pair and then tracks them using pyramidal Lucas-Kanade in the right image. To densify the sparse correspondences, the algorithm computes the zero-mean normalized cross-correlation (ZNCC) in small patches around every seed pair and uses it as a quality metric for each match. In this code, we introduce a custom structure to store the location and ZNCC value of correspondences called "Match". Seed Matches are stored in a priority queue sorted according to their ZNCC value, allowing for the best quality Match to be readily available. The algorithm pops Matches and uses them to extract new matches around them. This is done by considering a small neighboring area around each Seed and retrieving correspondences above a certain texture threshold that are not previously computed. New matches are stored in the seed priority queue and used as seeds. The propagation process ends when no additional matches can be retrieved.</p>
<dl class="section see"><dt>See also</dt><dd>This code represents the work presented in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Stoyanov2010">[230]</a>. If this code is useful for your work please cite <a class="el" href="../../d0/de3/citelist.html#CITEREF_Stoyanov2010">[230]</a>.</dd></dl>
<p>Also the original growing scheme idea is described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Lhuillier2000">[141]</a> </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/stereo/<a class="el" href="../../df/d21/quasi__dense__stereo_8hpp.html">quasi_dense_stereo.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:48 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
